﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using System.Web.Profile;

namespace OnlineFloralShop.Account
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
        }

        protected void btndk_Click(object sender, EventArgs e)
        {

           MembershipUser newUser =  Membership.CreateUser(txtuser.Text, txtpass.Text, txtmail.Text);


           ProfileBase p = ProfileBase.Create(txtuser.Text);
           p.SetPropertyValue("Name", txtName.Text);
           p.SetPropertyValue("Phone", txtPhone.Text);
           p.Save();
           if (Request.QueryString["ReturnUrl"] != null)
               Response.Redirect(Request.QueryString["ReturnUrl"].ToString());
           else
               Response.Redirect("~/Account/Login.aspx");


            
            
        }
    }
}
